-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Allow psycopg2 2.9.10 #34893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow psycopg2 2.9.10 #34893
Conversation
|
Assigning reviewers: R: @tvalentyn for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
| 'scikit-learn>=0.20.0', | ||
| 'setuptools', | ||
| 'sqlalchemy>=1.3,<3.0', | ||
| 'psycopg2-binary>=2.8.5,<3.0.0,!=2.9.10', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we instead have two constraints here:
'psycopg2-binary>=2.8.5,<2.9.10; python_version <= "3.9"',
'psycopg2-binary>=2.8.5,<3.0; python_version >= "3.10"'
This way, it will be easier to maintain by dependabot and eventually easier to spot that this logic can be cleaned up when Python 3.9 is deprecated.
Adding an OS constraint if desired should be possible too via:
sys_platform != "darwin"
sys_platform == "darwin"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do the targeted constraint in-line like that (3.9 + darwin excluding 2.9.10 specifically) and it was quite messy. I'm okay to just split 3.9/3.10 if you'd prefer to avoid the more programatic setup
sdks/python/setup.py
Outdated
| 'tensorflow': [ | ||
| 'tensorflow>=2.12rc1,<2.13' | ||
| ], | ||
| 'torch': ['torch<=1.13.0,<=2.0.0'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use strict upper bound, so <2.1.0 or <2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was just a formatting change, the torch bound has been in that form
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know, my ask was to fix it while at it, since it's a bad practice to have them: https://cwiki.apache.org/confluence/display/BEAM/Dependency+management+guidelines+for+Beam+Python+SDK+maintainers#DependencymanagementguidelinesforBeamPythonSDKmaintainers-Howtoaddanewdependency?
My bad, I wasn't clear.
The binary issues for psycopg2 version 2.9.10 (reported in #1737) have not been fixed (omitting correctly built python 3.9 wheels for arm64 macos machines) but this specifically forces 3.9 macos builds to use older versions of the package. This allows the later version for every other currently supported environment and helps unblock Python 3.13 support.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.